import Vue from 'vue'
import App from './App.vue'
//导入路由
import router from './router'
//导入状态管理
import store from './store'
//组件
import iView from 'iview'
import Storage from 'vue-lsp'
//导入插件
import './plugins'
import VueContextMenu from 'vue-contextmenu'
import vcolorpicker from 'vcolorpicker'

import * as ComponentMap from "./components"
import {getDicItem,getDicValue} from '@/utils/dicUtil'

const options = {
  namespace: 'flow__', // key prefix
  name: 'ls', // name variable Vue.[ls] or this.[$ls],
  storage: 'local' // storage name session, local, memory
}

Object.keys(ComponentMap).forEach(componentName => {
  console.log(componentName)
  Vue.component( componentName, ComponentMap[ componentName ] );
})

Vue.config.productionTip = false
Vue.use(iView)
Vue.use(Storage,options)
Vue.use(VueContextMenu)
Vue.use(vcolorpicker)
new Vue({
  router,
  iView,
  store,
  render: h => h(App)
}).$mount('#app')
